package juego

import org.uqbar.arena.windows.SimpleWindow
import model.AppModel.ResolverMisterioAppModel
import org.uqbar.arena.windows.WindowOwner
import org.uqbar.arena.widgets.Panel
import org.uqbar.arena.widgets.Label
import model.AppModel.LugarAppModel
import org.uqbar.arena.widgets.Button

class NotaFinalWindow extends SimpleWindow<ResolverMisterioAppModel>{
	
	@Property String descripcion
	@Property String boton
	@Property String saludo
	
	new(WindowOwner parent, ResolverMisterioAppModel model, String descri, String bot) {
		super(parent, model)
		title = modelObject.caso.nombre + " - Resuelto"
		this._descripcion = descri
		this._boton = bot
	}
	
	override protected addActions(Panel actionsPanel) {
		new Button(actionsPanel) => [
			caption = boton
			onClick [| close]
		]
	}
	
	override protected createFormPanel(Panel mainPanel) {
		new Panel(mainPanel) => [
			new Label(it) => [text = descripcion + modelObject.caso.responsable.nombre fontSize = 13]
		]
	}
	
}